package org.hawk.gwt.ppc.parser;

import java.util.List;

/**
 * Represents <code>switch</code> java expression.
 *  
 * @author alex.bereznevatiy@gmail.com
 *
 */
public interface SwitchExpressionDescriptor extends ExpressionDescriptor, LabeledBlockDescriptor {
	
	/**
	 * @return expression to evaluate switch block on.
	 */
	ExpressionDescriptor getSwitchExpression();
	/**
	 * Gets list of case expression to match the switch expression.
	 * These are constant expressions that are located between <code>case</code>
	 * keywords and colon.
	 *  
	 * @return list of case labels
	 */
	List<ExpressionDescriptor> getCases();
	
	/**
	 * @param caseExpression
	 * @return list of expressions that match specific case label or <code>null</code> if there is no such expression.
	 */
	List<ExpressionDescriptor> getCaseExpression(ExpressionDescriptor caseExpression);
	
	/**
	 * @return default expression on <code>null</code> if there aren't any.
	 */
	List<ExpressionDescriptor> getDefault();
}
